package com.zhy.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author zhy
 * @Description ribbon自定义规则类
 * @ClassName MySelfRule
 * @Date 2020/12/2 16:22
 **/
@Configuration
public class MySelfRule {

    @Bean
    public IRule myRule(){
        //定位随机
        return new RandomRule();
    }

}
